package com.cnap.model.schedule.engine;

import com.cnap.model.cloud.CloudVmModel;

import java.util.List;

/**
 * <类文件描述>
 *
 * @author xc
 **/
public class VmModel {
    // 名称
    private String name;
    // 规格id
    private String flavorId;
    // 镜像id
    private String imageId;
    // regionId
    private String regionId;
    // zoneId
    private String zoneId;
    // sysDiskSize
    private int sysDiskSize;
    // sysDiskType
    private String sysDiskType;
    // 硬盘
    private List<DataDisk> dataDisks;
    // 带宽
    private int bandwidth;
    // 付费模式
    private String vmChargeType;
    // 单位
    private String chargeUnit;
    // 数量
    private int chargeCount;
    // 付费模式
    private String eipChargeType;
    // 云商
    private String cloudType;

    /**
     * get
     *
     * @return SysDiskType
     */
    public String getSysDiskType() {
        return sysDiskType;
    }

    /**
     * set
     *
     * @param sysDiskType sysDiskType
     */
    public void setSysDiskType(String sysDiskType) {
        this.sysDiskType = sysDiskType;
    }

    /**
     * get
     *
     * @return Name
     */
    public String getName() {
        return name;
    }

    /**
     * set
     *
     * @param name name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * get
     *
     * @return FlavorId
     */
    public String getFlavorId() {
        return flavorId;
    }

    /**
     * set
     *
     * @param flavorId flavorId
     */
    public void setFlavorId(String flavorId) {
        this.flavorId = flavorId;
    }

    /**
     * get
     *
     * @return ImageId
     */
    public String getImageId() {
        return imageId;
    }

    /**
     * set
     *
     * @param imageId imageId
     */
    public void setImageId(String imageId) {
        this.imageId = imageId;
    }

    /**
     * get
     *
     * @return RegionId
     */
    public String getRegionId() {
        return regionId;
    }

    /**
     * set
     *
     * @param regionId regionId
     */
    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    /**
     * get
     *
     * @return ZoneId
     */
    public String getZoneId() {
        return zoneId;
    }

    /**
     * set
     *
     * @param zoneId zoneId
     */
    public void setZoneId(String zoneId) {
        this.zoneId = zoneId;
    }

    /**
     * get
     *
     * @return SysDiskSize
     */
    public int getSysDiskSize() {
        return sysDiskSize;
    }

    /**
     * set
     *
     * @param sysDiskSize sysDiskSize
     */
    public void setSysDiskSize(int sysDiskSize) {
        this.sysDiskSize = sysDiskSize;
    }

    /**
     * get
     *
     * @return DataDisks
     */
    public List<DataDisk> getDataDisks() {
        return dataDisks;
    }

    /**
     * set
     *
     * @param dataDisks dataDisks
     */
    public void setDataDisks(List<DataDisk> dataDisks) {
        this.dataDisks = dataDisks;
    }

    /**
     * get
     *
     * @return BandWith
     */
    public int getBandwidth() {
        return bandwidth;
    }

    /**
     * set
     *
     * @param bandwidth bandWith
     */
    public void setBandwidth(int bandwidth) {
        this.bandwidth = bandwidth;
    }

    /**
     * get
     *
     * @return VmChargeType
     */
    public String getVmChargeType() {
        return vmChargeType;
    }

    /**
     * set
     *
     * @param vmChargeType vmChargeType
     */
    public void setVmChargeType(String vmChargeType) {
        this.vmChargeType = vmChargeType;
    }

    /**
     * get
     *
     * @return ChargeUnit
     */
    public String getChargeUnit() {
        return chargeUnit;
    }

    /**
     * set
     *
     * @param chargeUnit chargeUnit
     */
    public void setChargeUnit(String chargeUnit) {
        this.chargeUnit = chargeUnit;
    }

    /**
     * get
     *
     * @return ChargeCount
     */
    public int getChargeCount() {
        return chargeCount;
    }

    /**
     * set
     *
     * @param chargeCount chargeCount
     */
    public void setChargeCount(int chargeCount) {
        this.chargeCount = chargeCount;
    }

    /**
     * get
     *
     * @return EipChargeType
     */
    public String getEipChargeType() {
        return eipChargeType;
    }

    /**
     * set
     *
     * @param eipChargeType eipChargeType
     */
    public void setEipChargeType(String eipChargeType) {
        this.eipChargeType = eipChargeType;
    }

    /**
     * get
     *
     * @return CloudType
     */
    public String getCloudType() {
        return cloudType;
    }

    /**
     * set
     *
     * @param cloudType cloudType
     */
    public void setCloudType(String cloudType) {
        this.cloudType = cloudType;
    }


    /**
     * 转换成创建虚机的请求模型
     *
     * @return 结果
     */
    public CloudVmModel toCloudVmModel() {
        CloudVmModel cloudVmModel = new CloudVmModel();
        // name
        cloudVmModel.setName(name);
        // flavorId
        cloudVmModel.setFlavorId(flavorId);
        // imageId
        cloudVmModel.setImageId(imageId);
        // regionId
        cloudVmModel.setRegionId(regionId);
        // zoneId
        cloudVmModel.setZoneId(zoneId);
        // sysDiskSize
        cloudVmModel.setSysDiskSize(sysDiskSize);
        // dataDisks
        cloudVmModel.setDataDisks(dataDisks);
        // bandWidth
        cloudVmModel.setBandwidth(bandwidth);
        // vmChargeType
        cloudVmModel.setVmChargeType(vmChargeType);
        // chargeUnit
        cloudVmModel.setChargeUnit(chargeUnit);
        cloudVmModel.setChargeCount(chargeCount);
        cloudVmModel.setEipChargeType(eipChargeType);
        cloudVmModel.setCloudType(cloudType);
        cloudVmModel.setSysDiskType(sysDiskType);

        cloudVmModel.setBusinessId(null);
        cloudVmModel.setCloudVendor(null);
        cloudVmModel.setCpuNum(1);
        cloudVmModel.setMemByG(3);
        cloudVmModel.setDiskByG(100);
        cloudVmModel.setVmId(null);
        cloudVmModel.setVmName(null);
        return cloudVmModel;
    }
}
